<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a="http://richfaces.org/a4j">

	<h:form>
		<rich:extendedDataTable style="width: 100%;" value="#{tasks}"
			var="task" rows="20" id="table" rowClasses="odd-row, even-row"
			onRowMouseOver="this.className='extdt-row-selected'"
			onRowMouseOut="this.className=''" styleClass="stable">

			<ui:param name="applicationx"
				value="#{taskBean.getApplication(task)}" />

			<rich:column label="#{messages['task.name']}" width="20%">
				<f:facet name="header">
					<h:outputText value="#{messages['task.name']}" />
				</f:facet>
				<h:outputText value="#{task.name}" converter="taskNameConverter" />
			</rich:column>

			<rich:column label="#{messages['task.createTime']}" width="20%">
				<f:facet name="header">
					<h:outputText value="#{messages['task.createTime']}" />
				</f:facet>
				<h:outputText value="#{task.createTime}" />
			</rich:column>

			<rich:column label="#{messages['application.name']}" width="25%">
				<f:facet name="header">#{messages['application.name']}</f:facet>
				<h:outputText value="#{applicationx.name}" />
			</rich:column>

			<rich:column label="#{messages['application.customer.name']}"
				width="20%">
				<f:facet name="header">#{messages['application.customer.name']}</f:facet>
				<h:outputText
					value="#{applicationx.applicant.lastname} #{applicationx.applicant.firstname}" />
			</rich:column>

			<rich:column label="#{messages['application.customer.pesel']}"
				width="15%">
				<f:facet name="header">#{messages['application.customer.pesel']}</f:facet>
				<h:outputText value="#{applicationx.applicant.pesel}" />
			</rich:column>

			<a:support event="onRowClick"
				action="#{taskBean.setSelectedTask(task)}" />

			<f:facet name="footer">
				<rich:datascroller for="table" id="tableScroller" />
			</f:facet>
		</rich:extendedDataTable>
	</h:form>
</ui:composition>